import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:raze/potions/raze_constant.dart';
import 'package:raze/potions/spatial_alchemy.dart';

/// 空状态组件
class VoidPlaceholderWidget extends StatelessWidget {
  final String message;

  final double? imageWidth;

  final double? imageHeight;

  final double? textSize;

  const VoidPlaceholderWidget({
    super.key,
    required this.message,
    this.imageWidth,
    this.imageHeight,
    this.textSize,
  });

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          // 空状态图片
          Image.asset(
            'assets/images/empty-status.png',
            width: imageWidth ?? 120.w,
            height: imageHeight ?? 120.w,
            fit: BoxFit.contain,
          ),

          // 提示文本
          Text(message)
              .applyTypeSize(textSize ?? 16.sp)
              .applyTypeColor(RazeConstants.black.withOpacity(0.6))
              .applyNotoSans()
              .enshroudHorizontal(40.w),
        ],
      ),
    );
  }
}
